<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
	      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
	<script src="jquery.min.js"></script>
</head>
<body>
	<input type="button" id="goout" value="出去">
	<input type="button" id="comeon" value="来了">
	<input type="button" id="cn" value="点击">
	<br>
	<img src="1%20(5).jpg" alt="" style="width: 500px" id="re">
</body>
<script>
	$("#goout").click(function () {
		$("#re").slideUp(3000,function () {
			alert("你来了");
		})
	});
	$("#comeon").click(function () {
		$("#re").slideDown(3000,function () {
			alert("我来了");
		})
	});

	$("#cn").click(function () {
		// 自我判断能力slideToggle（）
		$("#re").slideToggle(30);
	});
</script>

</html>